<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/5/25
  Time: 19:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>showOne</title>
</head>
<body>
<form action="../mem/update" id="formOne">
    <table border="1px red solid" cellpadding="0" cellspacing="0">
        <th>会员信息</th>
        <tr><input type="text" name="id" value="${member.mid}" hidden /></tr>
        <tr>姓名: <input type="text" value="${member.mname}" name="name" class="name"/> </tr>
        <tr>
            性别:
            男<input name="sex" type="radio" class="sex"
                <c:if test="${member.mgender== 1}"> checked  </c:if> value="1" />
            女<input name="sex" type="radio" class="sex"
                <c:if test="${member.mgender== 0}"> checked  </c:if> value="0" />
        </tr>
        <tr>年龄: <input type="text" value="${member.age}" name="age" class="age" /> </tr>
        <tr>家庭住址: <input type="text" value="${member.maddress}" name="address" class="address"/> </tr>
        <tr>邮箱: <input type="text" value="${member.memail}" name="email" class="email"/> </tr>
    </table>
    <input type="submit" value="提交" />
    <input type="button" value="重置" onclick="resetStr()" />

</form>

</body>
</html>
<script src="${pageContext.request.contextPath}/statics/js/jquery-3.5.1.js"></script>
<script>
    function resetStr(){
        alert("执行重置函数");
        $("name").val("");
        $("sex").val("");
        $("age").val("");
        $("address").val("");
        $("email").val("");
        document.getElementById("formOne").reset();
        $(':input','#myform')
            .not(':button, :submit, :reset, :hidden')
            .val('')
            .removeAttr("checked");
    }
</script>